<?php
$this->breadcrumbs=array(
	'商户'=>array('index'),
	'管理',
);

$this->menu=array(
	array('label'=>'所有商户', 'url'=>array('index')),
	array('label'=>'新建商户', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('partner-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>商户管理</h1>


<?php echo CHtml::link('高级搜索','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'partner-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'id',
		'username',
		//'password',
		'title',
		'city_id',
		'bank_name',

		'bank_no',
		'bank_user',
		'location',
		'contact',
		'phone',
		'address',
		'other',
		'mobile',
		'enable',
		//'user_id',
		array('name'=>'create_time',
				'value'=>date('YmdGi', $model->create_time),
		),

		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
